Skip to content

fix(platform): retire the unused Crossview, Headlamp and Backstage remains - #5384

Merged
devantler merged 8 commits into
mainfrom
claude/remove-crossview-headlamp
Oct 27, 2026
Merged

devantler merged 8 commits into
mainfrom
claude/remove-crossview-headlamp

Conversation

@devantler

@devantler devantler commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Why

Crossview, Headlamp and Backstage are no longer used, and the KSail web UI is taking over the cluster UI job: Headlamp parity is tracked in devantler-tech/ksail#5827, and native Crossplane viewing at Crossview parity in devantler-tech/ksail#8011. Keeping them costs cluster resources, sign-in wiring, stored credentials and security-scan exceptions for tools nobody opens. Backstage's retained database was still running. The maintainer decided to delete it rather than keep a recovery copy.

What

Removes Crossview and Headlamp and everything that existed only for them: their sign-in routes and callbacks, network allowances, secrets, monitoring and alerting, security-scan exceptions (including the Headlamp-only exceptions copy), update rules, local host names and docs. Crossview's stored credentials stay in the vault until the leftovers are retired, so a failed deploy can still heal cleanly; #5391 removes them afterwards. Shared alerting to Slack keeps working.

Removes Backstage's remains: its retained database's namespace setup and monitoring, and the storage-protection workflow and tooling that guarded it.

A new one-off workflow deletes what the platform deliberately keeps after a removal: the three namespaces, the two releases, the Backstage database and the storage volumes still holding their data. It runs only once the removal has deployed, never touches other apps' storage, and proves nothing is left.

Part of #2496
Fixes #4266
Fixes #5122

👉 After merge/promotion: once the deploy finishes, run the "Retire Unused App Leftovers" workflow from main to delete the protected leftovers. The Backstage database has no backup, so this deletion cannot be undone.

🤖 Generated with Claude Code

Neither cluster UI is in use, and the KSail web UI is taking over their
role (devantler-tech/ksail#5827, devantler-tech/ksail#8011). Remove both
apps and everything that existed only for them: SSO routes and Dex
callbacks, network allowances, Coroot risk acceptances and alerting, the
Crossview login sensor, Kubescape exception entries and the Headlamp-only
exceptions mirror with its generator mode, Renovate rules, local hosts,
docs and the approved authorization ledger entries.

The vault-config Job now deletes Crossview's retired read policy and
destroys its generated credentials, which their PushSecrets never remove.
The hosted Docker registry-cache setup moves to a shared helper so the
Wedding runtime fixture keeps it without the Crossview fixture.

The Longhorn client maintenance journal schema still names Crossview: its
completed journal is validated against that scope on every deploy, and
the completed path reads no Crossview object.

Fixes #2496

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
devantler and others added 3 commits October 26, 2026 19:38
…ew-headlamp

# Conflicts:
#	scripts/validate-eks-ci-role-policy/approved-surface.txt
Production disables Flux pruning on Namespaces, HelmReleases and claims,
so removing the manifests leaves both apps running. Add the explicit
second stage as a main-only dispatch workflow under the prod-deploy lock.

It refuses to act until the infrastructure-controllers, infrastructure
and apps Kustomizations are Ready for their generations and own no object
of either app, then uninstalls the two releases, deletes the retained
claim and waits for its volume, deletes both namespaces (each checked as
owned by apps) and the Kubescape summaries named after them, and proves
none of it, nor the retired bindings, remains. Reruns are idempotent and
a failed read is UNKNOWN, never "absent".

Refs #2496

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backstage is no longer used, and the maintainer decided on 26 October
2026 to delete its retained database rather than keep a recovery copy
(#5122). Remove the retained namespace, network policy and Coroot monitor
credential, the storage-protection workflow with its Go tool and the
internal/portalstorage package only it used, the retained-instance
network test, and the workflow's KSail pin entry. Docs and the AGENTS
retention note now describe the deletion.

The leftover retirement becomes one generic workflow and script for
Crossview, Headlamp and Backstage. After proving the removal deployed,
it deletes the backstage-db Cluster before the namespaces, then the
Retain volumes once Released and the Longhorn volumes last claimed in a
retired namespace once detached, leaving all other storage alone. Both
storage loops are bounded on every pass and fail closed on a failed read.

The Longhorn client-maintenance journal schema still names backstage-db;
its completed journal is validated against that scope on every deploy.

Refs #4266

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler devantler changed the title fix(platform): retire the unused Crossview and Headlamp UIs fix(platform): retire the unused Crossview, Headlamp and Backstage remains Oct 26, 2026
CI's ShellCheck rejects SC2015 in the stale-Kustomization and failed-read
cases. Assert each status and its message with the shared helper, then
assert separately that nothing was deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

🤖 Generated with Claude Code

@devantler

Copy link
Copy Markdown
Contributor Author

Readiness evaluation at 454525f4ab6fc23de035910021bd50e1fddf61e4

What I exercised, as the platform's operator:

  • Rendered effect. Every Flux layer for both clusters builds. The production apps, infrastructure and controller layers render no Crossview, Headlamp or Backstage object. The only remaining mentions are the vault-config retirement step and two comments. ksail workload validate passes for the local and production overlays.
  • Deploy gates against live state (read-only, scoped OIDC context). The objects this removes from Git that production keeps are the crossview, headlamp and backstage Namespaces, both HelmReleases and the backstage-db Cluster. All already carry kustomize.toolkit.fluxcd.io/prune: disabled, which the deploy's live persistence-retirement gate requires. The retained claims are owned by the database Cluster or the chart, not by Flux. The Longhorn client-maintenance journal is complete, so its deploy path reads none of the removed apps.
  • Retirement workflow. The offline fixture covers 17 cases, including: an undeployed removal in any layer, a stale Kustomization, a foreign object, failed reads (including in the storage listings and the final proof), an attached Longhorn volume, unrelated storage that must survive, a partial rerun, and survivors. Five deliberate mutations of its safety checks were each killed by the expected case.
  • Ledger. The authorization surface diff is exactly the removed releases, repositories and bindings plus three changed entries, each explained in the history.

Unreachable gate: deleting the protected leftovers needs the production admin credential, which exists only in the prod environment. The post-merge Retire Unused App Leftovers run is that observation. It prints each deletion and ends by proving nothing remains, and I will verify its result read-only afterwards.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review skipped: 146 files exceed the limit of 100.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devantler

Copy link
Copy Markdown
Contributor Author

@codex review for the production retirement workflow script and Vault, Dex and network removals

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T22:33:19.729869Z 104b2b4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 454525f4ab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…ment

A merge-group deploy is speculative. If it were evicted after the
infrastructure layer applied, the vault-config Job would already have
destroyed Crossview's credentials, and pruning the generated-password
ExternalSecrets would drop their cached values, so healing back to main
would regenerate credentials Crossview's retained database was never
initialised with.

Keep the seed chain and the vault-config Crossview grants declared, and
exempt exactly those nine seed objects from the retirement's "removal
deployed" check. Their removal and the credential destruction move to a
follow-up that runs only after the explicit retirement (#5391).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler

Copy link
Copy Markdown
Contributor Author

@codex review

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: c3666a3e2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@devantler

Copy link
Copy Markdown
Contributor Author

Readiness evaluation at c3666a3e2f6b6e1ce74e1f0073a6431e943431de

What I exercised, as the platform's operator:

  • Rendered effect. Every Flux layer for both clusters builds. The production apps, infrastructure and controller layers render no Crossview, Headlamp or Backstage object. The only remaining Crossview objects are its nine Vault seed objects, kept until Remove Crossview's Vault seed chain after its retirement #5391 so a healed failed deploy finds the original credentials. ksail workload validate passes for the local and production overlays.
  • Deploy gates against live state (read-only, scoped OIDC context). The objects this removes from Git that production keeps are the crossview, headlamp and backstage Namespaces, both HelmReleases and the backstage-db Cluster. All already carry kustomize.toolkit.fluxcd.io/prune: disabled, which the deploy's live persistence-retirement gate requires. The retained claims are owned by the database Cluster or the chart, not by Flux. The Longhorn client-maintenance journal is complete, so its deploy path reads none of the removed apps.
  • Retirement workflow. The offline fixture covers 18 cases, including: the retained seed chain against a near-miss, an undeployed removal in any layer, a stale Kustomization, a foreign object, failed reads (including in the storage listings and the final proof), an attached Longhorn volume, unrelated storage that must survive, a partial rerun, and survivors. Six deliberate mutations of its safety checks were each killed by the expected case.
  • Ledger. The authorization surface diff is exactly the removed releases, repositories and bindings plus three changed entries, each explained in the history.
  • Review: CodeRabbit skipped the PR (146 files exceed its 100-file limit). Codex reviewed 454525f, and its one finding is fixed in c3666a3 and resolved. Codex then reviewed c3666a3 with no findings.

Unreachable gate: deleting the protected leftovers needs the production admin credential, which exists only in the prod environment. The post-merge Retire Unused App Leftovers run is that observation. It prints each deletion and ends by proving nothing remains, and I will verify its result read-only afterwards.

🤖 Generated with Claude Code

@devantler
devantler marked this pull request as ready for review October 26, 2026 21:13
@devantler
devantler added this pull request to the merge queue Oct 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 26, 2026
…ew-headlamp

# Conflicts:
#	.github/workflows/protect-backstage-storage.yaml
@devantler

Copy link
Copy Markdown
Contributor Author

@codex review

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 0352304a75

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@devantler
devantler added this pull request to the merge queue Oct 26, 2026
#5383 reorganises the Homepage groups and adds fixture lines next to the
one this PR renamed, which the merge queue cannot combine. Keep main's
fixture here; the rename follows in #5391 once #5383 has merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler
devantler removed this pull request from the merge queue due to a manual request Oct 26, 2026
@devantler

Copy link
Copy Markdown
Contributor Author

@codex review

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 104b2b44b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@devantler
devantler added this pull request to the merge queue Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Fresh production verification for 104b2b44b113e94d9cd1f86a4f975912d5e2b2fe: the protected merge-group deployment completed successfully, and its published artifact matches the live applied revision.

The retained database remains present after removal of its supporting network policy. The read-only platform health check now fails, and the database reports an incomplete failover. Startup evidence identifies API connectivity timeouts; the other three database clusters report full readiness. Detailed runtime evidence is retained privately.

This makes the post-merge Retire Unused App Leftovers workflow and its independent absence/shared-service-health readback the immediate remaining verification step. Application reconciliation reporting Ready does not establish completion of that cleanup. The PR is still queued and has a live maintainer holder, so this observation leaves its source and queue ownership with that session. No production write or deletion was performed.

Merged via the queue into main with commit 6da2e00 Oct 27, 2026
53 checks passed
@devantler
devantler deleted the claude/remove-crossview-headlamp branch October 27, 2026 00:19
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Oct 27, 2026
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Post-merge verification: this PR merged at 6da2e00896613bb398a284e51494ee60167e3597, and its current-main Validate Main run succeeded. The Retire Unused App Leftovers workflow is active but has zero runs. It is dispatch-only; merging the source does not start the cleanup.

The remaining acceptance gate is that workflow's verified cleanup followed by independent absence and shared-service-health checks. The read-only health check remains unhealthy, so source merge is not yet a completed retirement. The existing maintainer session still owns the cleanup; this run has made no production mutation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Establish backup and recovery acceptance for the retired portal Retire the unused Backstage scaffold

1 participant